Fixed error with the generate interactions function.