selection alg fix