Fixed error in interaction dim check

Index in wrong place in interaction dimension check.