Fixed problem wih header memory leak