Fixed error from attempting to reduce an empty array when returned by roots()