Fixed bug where calculations where being made incorectly for 'root' definitions