fix bugs remaining after import