Fix a couple minor bugs that i forgot to test in initial release.

Signed-off-by: Peter Chester <peter@tri.be>