Minor bug fixes

Signed-off-by: Frank Mertens <frank@cyblogic.de>