Fix some tests and add more validations