moved a } to correct place