small changes, hunting the memory bug