fixed all bugs related to validations