fix with if condition