Added resize to make slider to work properly