fixing ajax issues