Fix some bugs related to hungryPolicy and SmartPolicyAgent