make copy and paste of buffers work properly on osx