Fix more warnings from #579
Merge pull request #609 from Tilka/fix_warnings

Fix more warnings from #579