Fix LayerActivity

This should fix any issues so we don't have to revert back but if not
we ill revert back.

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