fix a bug when return to homepage