Major Bugfixes

Note to self: Learn how to program