Fix notices in the code.

#3023