minor bugfixing for Qt - Algorithm.h