added error pages; fixed up db again