(a) Nothing herein contained shall require any change in the plans, construction, or designated use of a building actually under construction at the time of passage of the ordinance from which this chapter is derived, provided, however, that such building and use thereof was lawful under the zoning ordinance as may have existed when construction or use commenced. (b) If any amendment to this chapter is hereafter adopted changing the boundaries or districts or changing the provisions of this chapter with regard to buildings or uses legally existing, or to buildings legally under construction or to building permits legally issued, in the area affected by such amendment at the time of the passage thereof, such amendment shall not cause such use to be terminated or bar the occupancy of such building unless provided by other proceedings at law.