more sqlalchemy fixes.