Fixed ressource leak in load()