fix negative gold carried over (bug #20676, patch by Ayne)