Fixed issue with page error handling