fix error with indexing nil array
fix states YML true/falses