Fix issues of get and set functions