Fixed the rest of the bugs.