Fix database action when import is interucted