Fixed a couple of bugs regarding control