bugfixes

Signed-off-by: Daniel Dahlkvist (dice) <daniel.dahlkvist@dice.se>