Apply fixes to Gui class to be able to use the system clipboard on windows