Several small bugfixes

Signed-off-by: Robert R <mam09cqz@studserv.uni-leipzig.de>