Corrected selected tile logic