fix in Safari and IE (closes #1)