Fixes the failing test highlighted from pr #726