Fixes bug in static properties when changing between themes