fixed #157 with the help of openlayers PR 760