fix savepos issues