fix some condition and add some comment