X button reference fix