added a quick hack to commit callback