Fixed a bug whereby the resuluting list would be twice as big