Fixed missing defer.