copied bugix for OSM from master branch