Fix mistake in type for a function