solve the endliessloop of saving slot problem