Fixed bug in get-targetresource that failed the build