Removing broken javascripts from the head