syntax fix for insertBefore