improve getTheme() fix to avoid possible useless match on location