Fixed assign bugs