fix retainValue detection