fixed 404 and 505 errors