Fix moving records bug