made error pages dynamic