fix the issue in SPA