Fix several grapple hook issues. Fixes #1069.
Merge remote-tracking branch 'origin/master'