Fix '3 warnings and critical' error

fixes #7275

Signed-off-by: Gunnar Beutner <gunnar.beutner@netways.de>