Fix substitute prompt behavior