Change variable scope for theme compat