opts variable was 'undefined'

this caused crash of the entire script