Bugfixes

(lots of them :) )