Conditions set for dropdown are not working