Fix selection restoring. closes #78