Corrected construction of gen query inp messages