Better handling of boolean flag.