Fix atom range selector logic.