fixed a control structure error