Apply a patch to fix the error while working with bitmaps