fixed resolveInternal for relative paths