fixed another minor bug in create_nc_variable