Make the position calculation a bit more robust - see #300
Merge pull request #302 from forki/Position

Make the position calculation a bit more robust - see #300