fix bug that open-partial-template command doesn't work well