Handler to resolve problem of update ui in thread