fix slide resizing functionality