fix did slide to page sometimes not working