Fixing issue #730

Fix issue #730 and two warnings.