Minor changes to createCommit method