How can I stop multiple copies of the same program being run.