Fixed deprecated call, fixed sending 404 header