Fixing a bug found during mac testing