fix function loader