Solved some bugs.