Corrected wrong if comparison value