fixed a bug concerning bitmaps