Mazzarri: 'Ref ruined the game'