solved a memory leak! (bai bai)