fix domain bugs