fix throwing exception while typing imports