fix a bunch of warning.