Update plant_flag_tool.h

Fixed some bugs