fix to bytes bug