Fixing issue #185 and static analysis build issues.