fixed onResume problems

needs test