Fix for optional header and footer