Fixed a couple of bugs during ctable creation on disk.