Added code from pullrequest Branching point corrected (#284)