fix issues with inserting cells