more fixes (new delete of func/null ptr)