several fixes for mavericks