fixed web app lifecycle issue