fixed bug when there are no divisions