Fixing casting due to theme changes