Fix error handle