fix error on import failure. code restyling.