incorrect tile shape extraction bug fix (thanks @aroth for finding)