fixed closing the body early, also now throwing a 404 correctly.