Added back the insertBefore because it wasn't adding properly without it