flow: set position at the start of the function correctly