Added bitmap flipping