Scripts/Commands: Fix static analysis issues