Fix the error condition for two generic of two different types