Fixing the Linear least method