fix $last bug