[HOTFIX] fix some little bugs as pointed out by nortti

Signed-off-by: Tobias Markus <tobias@markus-regensburg.de>