removed duplicated if set FLAG_YARP