move ob_start() call outside of conditional