fix resource selection after command execution