Added annotation flag handling