Hide and show conditions are not functioning