leaks fixed

run instrusments and fix the bugs
commit