fix a bug caused by a variable being truncated.