fixed an error in heap build