Add listkeys sync version, but still has memory corrupction