fix size bug in ajax mode