fixed a crash, when using clipboard