Fix bugs

fixed bugs