Fix a really silly mistake in set key function.

omg all my fault.