Fixed some bugs

Signed-off-by: Sven Haardiek <Sven@Haardiek.de>