fix for truncated generated keys