forgot to clean up, added call to free headers