Output the correct number of inbound nodes.
Make bp more efficient.