Fixup calculateBase, try 2