only import appinst if necessary