Mavericks if statement fix