Update function item_dimensions()

Check to make sure there are actually three dimensions before outputting three dimensions, otherwise fall back to two dimensions