Add clipboard support and bug fix when running multiple times