Merge "Fix issues with bits allocated and consumed"