found a problem in algorithms.h and fixed it.