fix sqlalchemy stuff