fixed errors in MainActivity