Fix bug in last bit