Allegri keeps Milan on track