just to avoid warning: 'klen' may be used uninitialized in this function [-Wmaybe-uninitialized]