fixed ajax initialization issues