fix miss of bound check of Bitmap