fix assign val bug