Fixed logic error MainActivity.java