Fix the bugs

Complete