NothingSelected method is called on correct ref

Implements #997.