fixed a minor memory leak