Fixed double free caused SIGABRT