fix and test href restoring