more robust handling of positions