fix for truncation bugs