fixed annoying error: difference in accessing dimz() = 0 and dimz() = 1 (I assumed they were equal)