fix for completely idiotic double-increment issue