Fixed several bugs with committing and one with log diffing