corrected errors in main activity (java)