fix http error message, write unchecked response, cleanup