don't create hash from buffer in some cases.