Fixing some bugs, I'll work on more tomorrow :)