properly pass init_popstate to error pages