Fixed various errors in cuda LR