more improvements on obs script. Fixed bug of creating keys when data do...

Fixed a bug on obs script.... was creating empty dic keys that were causing problems