Update query.d

Hum I'm sure I sorted this out a long time ago. Oh well.
Basically it was using a string for type getting of instead of mixing it in and then grabbing the type.