Fix code for Mavericks.