messages, several fixes