fix bug in ajax