fix templating of max_heap