fix substitution behavior