fix exception when import error is a symbol