fixed various misassignment