Fixed 'then' expected near '=' error