Fix error with options structure that was not an array

Hello!

Last version got an error with a forEach on a non iterable variable (options).

Cheers,

Stuart