Made some minor changes to fix issues @kyleabeauchamp noted in his tests.