Accidentally used b outside of the for loop