fixed bug that weight is not reflected correctly