Assign $resource in callback-terminated call too