fixup linting and add protected on lifecycle

Created by  Bowei Liu  on December 26, 2020
HPOKB2TCHK3MTYYKXL3DE476BF3JXVSX6MSGI5NF4PSLALTS3PHQC
Change contents