fix for mysql key crash