fixed a bug about init