properly manage last_clicked node - close #584