Changed to a better conditional statement