some correction to the writePositions