Fixed warnings in MainActivity.