Trim possible extra data bytes