Fix bugs with openlayers