Fixing analysis warnings