workign on error pages