Fixed resolve bugs