Fixed awful memory leaks in lighting

bang