fixed mainactivity bug