Allegri: 'Defeat was undeserved'