fix array comparison issue in Activity