Fixed issue with slider functionality