fix broken debug flag check
Merge commit 'github/testing' into beta