Fixed the bugs of getting the length of Contant.Record.