Added missing case on query transform
Fixed a 'live variable' porential bug on generated code that throws exc