fixed some validations and tests