Altered SQLAlchemy commit