clear messages and errors when a modal is changed fixes #22