Fixes Id numbers after cloning entities