Fixing issues with retainAssignment class