fixed delete err
removed shared_ptr