Fixed the app crashing when going back to home screen

Null checks and stopping and starting the services appropriately fixed
the app crashing when going back to home screen