fix incorrect mapping with height!=powerOf2