Fixed double free error. Models with no material work now.