fix for recalculation of keyserialization size