temporary fix to mismatched allocation delete vs free