Fix some compile warnings. And also a mistake in duplicate-line