added close if } on row 416