TISTUD-3860 Fixing an edge case with clearing the preference