Fixed opts if not defined
Fixed opts if not defined.