Made sure activity in sample does not restart. Fixed #75.