No building, structure, or premises containing a nonconforming use shall hereafter be extended, altered, rebuilt or repaired after damage exceeding fifty (50) percent of its replacement costs, unless such extension or alteration shall conform to the provisions of the zoning district in which it is located, except as stated in section 31, above.