fix issue with conditions