fixed a minor intialization bug in mainactivity