fixed ++i map problem and others