Solved some bugs, working well now.