fix newRecord exceed max length bug