Fixing leaks

Signed-off-by: jamienoss <james.noss@lexisnexis.com>