some fixes on Mavericks