Attempt to fix the new algorithm