Some bug corrections
Some bug corrections