fixed truncate bug, all basic tests now pass