Properly fixed register clearing on CommitChanges
Style fix