Fix issues with clipboard
Modify signal handling