fixing slider bug