Fix the length of array equal 0 when add a item in the heap