fixed ajax errors