fix error with js option checking