fixed bug about error