changes related to #641 for os x