Fix error and add error handler page