fix a bug in local mode commit

i derped up some more....

really should get to know wx better

note that peterix has another solution to the problem.
you choose which one to use ;)