fix bugs

of importing data encrypted with different or wrong key
change global key