comments #6 - some bugfixes

Signed-off-by: Alexander Skjolden <alex@plastboks.net>