Effects of capacitance on phase dynamics of YBa2Cu3O7-x Josephson junctions