Fixing syntax before runtime errors