fixed bug - crash of popup in case bg is null