Added max_pool check as well.