clear flags