Fix bugs when copying/deleating data (crash if slot 1 was empty and crash if all theorems on a page where deleted