Fix a bug in LBR_core.cpp