Fix TWRP heap corruptions