Fixed bool cast not doing anything