[fix] Edge cases had some undefined vars.