Linear equations fixed. Now working properley