Minor bug fixes

Fixed these in the vain hope that it would cause this to pass the basic
integration test. haha no.