Fixed typecasting to Bool