Fixing theme detection
Fixing URLManager so it allows for overrides