Fixed tests
Inproved error messages