Fix problem with assigning NULL to lists