fixed some errors after validating