fix resolve bugs