Fix several issues with AI card selection