adafruit ina219

i have this project where i check the amps using the ina219 , im using the adafruit library .
when ever i have steady dc current that is not rapidly changing , it reads it perfectly , but when ever the current changes rapidly (checking currents through servos ) it gets wrong readings and also questionable high spikes when it should be 0.4 amps but reads 11 for example .
anyone that had similar problems , help would be appreciated thank you!.
// side function to calculate the current
double check_amp(void)
{
float shuntvoltage = 0;
float busvoltage = 0;
float current_mA = 0;
float loadvoltage = 0;
float power_mW = 0;
delay(300);
shuntvoltage = ina219.getShuntVoltage_mV();
busvoltage = ina219.getBusVoltage_V();

current_mA = ina219.getCurrent_mA();

return current_mA;
}
note : check current is activated 5 times per 1000 ms