Fix memory leak list of elements
Fix bug with duble calculate