fix resourceFlow bug