Here is the warning fixes from above comment.