Remove unset from function