fixed code generation for static variable expressions