Why the conditions are not working properly?