more bug fixes

Signed-off-by: Jamie White <hello@jamie-white.com>