add unlocking to finalisation of import