fixed some tests, and validation