added blankpage handling