updated behaviour of repiar.py and tmx_patcher.py