[BUGFIX] Check for presence of error page template before rendering it