fixing bug with options