corrected mistake in function

I forgot to use cut...