Fixing linear LL calculation