Fixed an issue where a pointer was being compared to a bool