Fixed terniary issue