Fix logic error that was making the number of backend nodes be off by one