Fix #17 truncate error