Fixed issues with MainActivity