fix loading map from a bitmap