fix sqlalchemy api changes _properly