Fixing init issue with slider element