fix some code warnings