avoided infinite loop in declaration statements