Found that ordering was set to DESC in display.class.php in the tables template. changed to this
if ($picsThisPage) {
$database->setQuery("SELECT * FROM #__rsgallery2_files".
" WHERE gallery_id='$gid'".
" AND published ='1'".
" ORDER BY ordering ASC".
" LIMIT $limitstart, $PageSize");
and the thumbnails now link to the correct picture.