fix pre-inc bug