Marking loader as registered avoiding memory leak