fixed bug may crash.