Fixing span bugs