removed incorrect bit logic