Fixing some Bugs, and found some bugs.