LayerActivity: Corrected lifecycle
Should contemplate the case that the activity gets stopped