Fixed warnings from sloppy coding