fix bugs

some little bugs fixed.