Fix some code warnings