fix error handling. It happens when use mapbox in oflline