Fix for clipboard paste bug