Fixed some bugs in mac dependencies