Fixed some bugs, still not working