this fixes the dissapearing chapters problem and some fixes in ordering of chapters with drag and drop