Some bug correction.