Generate correct posId on page refresh