fixed timing problem on mac.