Several small Bugfixes