fixing ajax stuff