hi! I just found a bug, this should be tileHeight instead of tileWidth. This causes the vertical mode to not behave correctly if tileWidth and tileHeight is different.
Oh I'm sorry. thank you so much, you are right. I didn't realize it because I always tested with the same width and height. I will upload the fixed version soon.