more bug fixes

Signed-off-by: Tim Janke <tim@janke.org>