Fix crash and make the MaxPool[Grad] op compiled better done.