Fixed duplicate not outputting error string