The variable $slider_count does not seem to be defined for all execution paths leading up to this point