fix api import errors