add weakreference for loader