Fix import errors more elegantly.