a couple of bugs in the controller methods has been fixed