CRAFTERCMS-926: fixed the issue with edit template