Fix incorrect use of break that was preventing app from closing when last window was closed.