My conditions do not work properly