various minor bug fixes

Signed-off-by: Tom Everett <tome@criticalmass.com>