fix extracting 2d-transform code (ignore z-dimension length)