opts variable was 'undefined'

this caused crash of the entire script
Merge pull request #34 from my8bit/master

opts variable was 'undefined'