Bugfixes

or at least fixes for 2 things which i think are bugs :-)