loadingBG fix for custom templates