Fixed calendar ajax bug