fixed a bug in page::isErrorPage() and added more tests