Bugfix: in some cases the selection got lost while extending it