optimize master switch detection
optimize master switch detection

* Only run if a true bool is stored. Previously it would always run except a false bool was stored

PietsmietApp/pietsmiet_xposter,l3d00m/pietsmiet_xposter