fixed copy/paste code for mac