Clean references controller, fix error msg.