fix mac os 10.8 bug