fix bugs with message input
improve input in messages