fix PR3489, use bits instead of bytes.