Fixed inventory to properly differentiate between columns and rows