Fixed: Crash caused by improper pointer management.