think I have now fixed the premature end to activity