Changed the loader function from being anonymous