Fix group selection when animation is in progress. Thanks @Kienz