Fixed coordinate selection logic

Now selects the correct coordinate to indicate as selected.