bug fixing ajax