fix ReferenceError in controls.js