cleaning up a few issues revealed by test