Fix a bug about getting compnent id