More bug fixes for selective import completion