fix visual editor bug