Fix the logical mistake in return