Fix bug in OnlineReg