Modify loading function.