Fixed error pages bug