tests on messages and fix errors