fix bug of not setting pvtype when adding PV