Show and hide conditions are not working