some fixes for bgoverlay