bugfix: choosing the worse instead of the best