fix ga function