fix preference commit crash