Fix initialization bug in unit setting plugin