Fixed a few bugs on slider initialization.