some fixes for JIT source generation; some known errors in generated code