Fixed exception while restarting activity