Fix for crash where activity would not be found.