I noticed a problem in a situation like this. Perhaps it is worth changing RefCount so that it preserves the input type and gives it to the output? 