BUG: Mismatched deallocate