Fixed to avoid callback with empty byte buffer.