Add a check for the right direction in JPS + deactivate the cache
Patch by kanetaka