scoping correction to try and resolve #131