fixed a null pointer crash, bug in stopped activities