fixed bug in ajvascript