Fix TryGet implementation