fix bugs about record