fixed crash on subnets -need to find better fix to increase c, maybe function for going to next