fix last slide onrefresh bug