Code for supporting Safari added (must use on Mac)