Fix bus errors with proper truncation.