fix template editor