fixing widget hooks to add scripts