bug fixed, but now == is wrong sometimes