replace boolval with the bool cast