Fix casting bool to pointer type