Fixing tests and validation