Fixed double JSON callback when http error occurs