fix shallow flash issues when using Mac OSX