fix $plain management