Fix bug for bitwidth