Fixes to control scripts