Fix ifdef logic