Small fixes to copying of tables