Fixed incorrect container choice on popstate