fix before_body_end