level unlock

Hey so i can't find an answer anywhere but i have 6 levels and i made it so when you cross the finish line it'll unlock the next level and i have a save attribute at the end of every level, while also having a load attribute at the main menu, my problem is that when ever i try to replay the level it locks the later levels again, how do i fix this?