max pooling bug fix