fix to restore selection