Ah yeah the problem is Greg did not account for all possible Inventory Sizes. You will have to rewrite the GUI to get any Number of Slots that I did not plan ahead for.
HOWEVER! For the Doublechest Sized Inventory, I would recommend just copypasting the GT6 Chests GUI 1:1, it should for the most part work perfectly fine. ^^