restore mac support
fix events on mac. fix phonetest for mac