Corrected small mistake in finalizing script