Fixed memory leak, test improved
Trying to fix merging conflict