fix navigation by clicking on thumbnails