fix mac 10.9 bugs