Fixed startPoint value casting inconsistency

as sugessted by @mristuccia in Issue #14 

Without this change, algorithm somethimes break first while a loop after second itteration and return only one point filled.