small changes to unsafePositions()