fixing bug with name matching