Fixed errors with get and set functions