corrected bug in the RefManager class