Fixed bugs

Fixed bugs