Fix ajax add period bug