Fix bugs revealed by strict mode.