Editor: fixed bugs in Firefox and IE