Fix small mistake in monkeypatching