I think bug fixed, need some revision