Finally handle state correctly
Fix state output printing