fix for uninitalised memory and free()/delete mismatches