Allegri: 'Ref ruined the derby'