fixed lifecycle issues