Fix memory freeing displaying absurdly large values