fixed bug in ajax.py