Fixing leaked variables.