Copy to clipboard not functioning as fully as expected