fixing appId issue and calculating status issue