added title
fixed flags bug