fix the exception handling in page