correct error when targetsite null