fix setting error and add logs