avoid commit in few situations