fix bug: error handle