fixed metadata and cell insertion handling