added better path resolving.