Fixed logic in coordSelect (hopefully)