Fixed an invalid memory access in case of an empty string keyAddBaseName