Fix flag parsing
Fix nil map case