Improve performances
Fix leak