fix: body element is null when popup is initialized outside of it, closes #305