fixed some errors in page validation