better leak check, fix production issues, all tests pass