mainButton fixed

sometimes the mainButton causes crash, it's fixed