fixed mismatched new delete