Fix bug in _commit function
Merge pull request #4 from fay-jai/wip

Fix bug in _commit function