Fix issues when loaded in admin theme