fix special handling of THEMES paths