Minor fix for proper error page handling