main activity bug fix