Automatically remove jumps

Fixes #596