Issue #24: Fix jumping from edges