fix deadlocks on importing