Found the bug, use memset to avoid uninitilized values.