small bug fixes for the LR model