fix loading the nif