Fixed startPoint value casting inconsistency

as sugessted by @mristuccia in Issue #14
Merge pull request #18 from EmilYo/master

Fixed startPoint value casting inconsistency