fixed many bugs on replaceLists() method