fixed bug for remember last panel