fixed insertion case error and minor include bugs

Change-Id: I76b28dd9c440f4d14aa20088f9e8cbc022f64192