various fixes like lifecycle for forms/popups