fixed double == 0 problem