Linear regression fix