conditional fix

conditional statement needed fixing because more then one result was
showing in console