Changed error to show 404 or 403 depending on which it is