fix bugs and update SaleMainActivity.java