fix the 'header already sent' error when calling error_controller'40X and 50X method