Logofix + state handling