fix bug where error 404 was 500ing