fixed variable references in 'exec_sync'