Allegri: 'Milan deserved it'