Fix error messages, and a few errors too