Fix bug with defined