Fix loop declaration for chp