Fix expression generation