Untested code changes from SourceForge code
Fixes to graphic copying