Wait until imports are loaded before instantiating