try to fix data race

This is flagged by travis on got tip