Bugfixes

bugs, bugs everywhere