call hash_next in order to not dereference NULL