Better approach the hasData side effects fix. Thanks gibson042

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>