more bug fixes and controls