fix logic for setting