Having this defined at the top also broke this function in cases where license html wasn't loaded yet. Works again now.