fix condition issue