fix smp free all function