Fixed the bugs.