fixed minor bug in create_nc_variable