Fix the boolean to pointer cast warning