Commit before attempting a change in entities

May move to v2.0 API because it provides more information.