Fixed http error handling for #63