Some bugfixes

My stuff from the weekend