Fixed android life cycle bug