fixed the bad behaviour of loadBitmaps