fix setting bugs.