Fix boolean type casting

I can't believe we missed this.