fixed ajax statements in all code