fixes from @kyleabeauchamp and appveyor