app update. fixing logic