modified some message checks in a test and modified the controller, to pass the test