fix $unset bug