Small mistake in library slice function