fixed some errors found while validating