Fixed iteration error