Make menu's checked property flipped automatically, fixes #349.