Fixed some warnings from code inspection.