Minor modification to messages controller