fix bug in sample and hold wrapper for grc