fix spans and scripts