Fixed slider bug on page reload