Added handling to messages.
Bug smash.