minor bugfixes

first of all, thanks for your work
i have some things more, but i need more time to dig deeper