Fix for #2

Resolves the error about “‘bid’ is not defined”.