Hopefully fixed the first bit being set incorrectly