Bug fixes, new truncate function in drivers