bug fixed fron states names

bug that didn't correctly extract states names from options object