fixed some small bugs from the validator