fixed some errors found by validator