Fixes issue #828 Bug - setOrientToPath causes array out of bounds error when using bezier path